#ifndef __USART_H_
#define __USART_H_

#include "stm32f10x.h"

typedef struct
{
    uint16_t volatile Wd_Indx;
    uint16_t volatile Rd_Indx;
    uint16_t Mask;
    uint8_t* pbuf;
} UartBuf;



#define RX_BUFFER_SIZE   128
#define TX_BUFFER_SIZE   32

extern unsigned char rx_buffer[RX_BUFFER_SIZE];
extern unsigned char tx_buffer[TX_BUFFER_SIZE];

void Usart_Init(uint32_t br_num);

void Usart_Put_Char(unsigned char DataToSend);
void Usart_Put_String(unsigned char* Str);
void Usart_Put_Buf(unsigned char* DataToSend, uint8_t data_num);

#endif
